<?php
// $Id$
/**
 * @file
 * Responsible for creating custom settings for the website.
 */

/*
 * Settings Page
 *
 * Usage: $var = variable_get('project_variable_identifier', 'DEFAULT_VALUE');
*/
function baseproject_settings_form($form_state) {
  $form = array();

  $form['fieldset1'] = array(
    '#type' => 'fieldset',
    '#title' => t('Fieldset Description'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
  );

  $form['fieldset1']['project_variable_identifier'] = array(
    '#type' => 'textfield',
    '#title' => t('Variable Title'),
    '#default_value' => variable_get('project_variable_identifier', 'DEFAULT_VALUE'),
    '#maxlength' => 256,
    '#required' => TRUE,
    '#description' => 'Description and Help'
  );

  $form['fieldset1']['project_variable_identifier2'] = array(
    '#type' => 'checkbox',
    '#title' => t('Variable Title'),
    '#default_value' => variable_get('project_variable_identifier2', TRUE),
    '#maxlength' => 256,
    '#required' => TRUE,
    '#description' => 'Description and Help'
  );

  $form['fieldset2'] = array(
    '#type' => 'fieldset',
    '#title' => t('Fieldset2 Description'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );

  $form['fieldset2']['project_variable_identifier3'] = array(
      '#type' => 'select',
      '#title' => t('Variable Title'),
      '#default_value' => variable_get('project_variable_identifier3', TRUE),
      '#maxlength' => 256,
      '#required' => TRUE,
      '#options' => array(
      'option1' => 'value1',
      'option2' => 'value2',
      'option3' => 'value3'
    ),
    '#description' => 'Description and Help'
  );

  $form['fieldset2']['project_variable_identifier4'] = array(
    '#type' => 'radio',
    '#title' => t('Variable Title'),
    '#default_value' => variable_get('project_variable_identifier4', TRUE),
    '#maxlength' => 256,
    '#required' => TRUE,
    '#description' => 'Description and Help'
  );

  $form['body'] = array(
    '#type' => 'textarea',
    '#title' => t('Description'),
    '#rows' => 7,
    '#required' => TRUE,
  );
  module_load_include('inc', 'baseproject', 'inc/special_replace');
  //add the settings reg and tm replaces
  _replace_specials_settings($form);
  // The system module create all submit and validate proccess
  return system_settings_form($form);
}